﻿CREATE VIEW [dbo].[PublisherView]
	AS
	select	(select COUNT(*) from PublisherAuthor as pa where pa.PublisherId = p.ID) as AuthorCount,
			(select COUNT(*) from Book as b where b.PublisherId = p.ID) as BookCount,
			p.City,
			p.ID as PublisherId,
			p.PublisherName
	from	Publisher as p;